﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;

namespace BankRemoteSystem.BL
{
    class TransactionBO
    {
        DataSet dt;
        
        DAL.Connection con;
        public DataSet getTransaction(string accountid)
        {
            con = new DAL.Connection();
            dt = new DataSet();
            string sql = "select * from [Transaction] where accountid = '" + accountid + "'";
            dt = con.ExecuteQueryDataSet(sql, CommandType.Text, null, "Trans");
            return dt;
        }
        public bool insertTrans(Entities.Transaction trans)
        {
            DAL.TransactionAO transAO = new DAL.TransactionAO();
            if (transAO.insertTrans(trans))
            {
                return true;
            }
            else
            {
                return false;
            }

        }
    }
}
